use clap::Parser;
use lemetrix_server::start_server;

#[derive(Parser)]
#[command(version, author, about, long_about = None)]
struct Cli {
    #[arg(short, long)]
    server_name: Option<String>,
}

#[tokio::main]
async fn main() {
    let cli_args = Cli::parse();

    // initialize tracing
    tracing_subscriber::fmt()
        .with_target(false)
        .compact()
        .init();

    // run our app with hyper, listening globally on port 3000
    start_server(&cli_args.server_name).await;
}
